package com.hnmqet.demo03.config;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import io.seata.core.context.RootContext;
import org.springframework.context.annotation.Configuration;


@Configuration
public class FeignOauth2RequestInterceptor implements RequestInterceptor {


    @Override
    public void apply(RequestTemplate requestTemplate) {
        String xid = RootContext.getXID();
        requestTemplate.header(RootContext.KEY_XID, xid);
        System.err.println("===================================");

    }
}
